﻿#region File Description
///////////////////////////////////////////////////////////////////////////////
/// \file Ruleset.cs
/// \brief This file stores the Ruleset class
/// \note This should be subclassed in application
/// \author Damian Johnstone, Bradley Mclain 
/// \date 15/5/2010
/// \remarks Copyright(c) 2010 LM01 Project Group (Animus Games - ViralFlux)
/// \remarks Some Rights Reserved.
/// Licenced under: Microsoft Reciprocal License (Ms-RL)
/// For More Information see: www.microsoft.com/opensource/licenses.mspx
///////////////////////////////////////////////////////////////////////////////
#endregion

namespace PropagationEngine
{
    /// <summary>
    /// \class Ruleset
    /// \brief This class Ruleset will be subclassed by implementations to define application specific rulesets for an ecosystem.
    /// \author Damian Johnstone, Bradley Mclain
    /// \date 15/05/10
    /// </summary>
    public abstract class Ruleset
    {
        /// <summary>
        /// \brief CheckExternalSpread works out that amount than an entity spreads between two given nodes
        /// \author Bradley Mclain
        /// \param sourceNode The node that the entity is coming from
        /// \param destinationNode The node that the entity is moving to
        /// \param entity The entity that is attempting to move
        /// \return the number of attacking entities that make it into the node
        /// \date 15/05/10
        /// </summary>
        public abstract int CheckExternalSpread(Node sourceNode, Node destinationNode, Transmission transmission);

        /// <summary>
        /// \brief CheckInternalSpread works out the amount that an entity spreads within a  given node
        /// \author Damian Johnstone
        /// \param entity The entity within node
        /// \param node The node in question
        /// \return The number of entities that have spread within the node
        /// \date 15/05/10
        /// </summary>
        public abstract int CheckInternalSpread(Node node, Transmission transmission);

        /// <summary>
        /// \author Steven Duda, Bradley Mclain
        /// \brief Default behaviour does nothing, override for application specific behaviour
        /// \note Called inside Node.Tick2()
        /// \date 14/08/2010
        /// </summary>
		public abstract void Cleanup(Node node);
		

        /// <summary>
        /// \author Steven Duda, Bradley Mclain
        /// \brief Default behaviour does nothing, override for application specific behaviour
        /// \note Called inside Node.Tick3()
        /// \date 17/08/2010
        /// </summary>
        public abstract void EntityInteraction(Node node);
    }
}
